/*
 * @Author: YanHSama
 * @Date: 2023-05-08 09:29:21
 * @LastEditors: YanHSama
 * @LastEditTime: 2023-07-05 17:08:07
 * @Description:
 */
import request from '@/utils/request'

// 获取供应商列表
export function getSupplierList(data) {
  return request({
    url: '/customer/bizsupplier/list',
    method: 'post',
    data
  })
}

/**通过供应商名称获取供应商列表
 *
 * @param {*} data
 * @returns
 */
export function listBySupplierrName(data) {
  return request({
    url: '/customer/bizsupplier/listBySupplierrName',
    method: 'post',
    params: data
  })
}

/**弹窗---获取供应商列表
 *
 * @param {*} data
 * @returns
 */
export function listBySupplier(data) {
  return request({
    url: '/customer/bizsupplier/listBySupplier',
    method: 'post',
    params: data
  })
}

// 创建供应商
export function createSupplier(data) {
  return request({
    url: '/customer/bizsupplier/save',
    method: 'post',
    data
  })
}

//修改供应商
export function updateSupplier(data) {
  return request({
    url: '/customer/bizsupplier/update',
    method: 'post',
    data
  })
}

//删除供应商
export function delSupplier(params) {
  return request({
    url: '/customer/bizsupplier/delete',
    method: 'delete',
    params
  })
}

//获取供应商详情
export function getSupplierInfo(id) {
  return request({
    url: `/customer/bizsupplier/info/${id}`,
    method: 'get'
  })
}
